import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:get/get_navigation/src/routes/get_route.dart';
import 'package:mvip_aida/layout/tabbar.dart';
import 'package:mvip_aida/pages/loginViewPage.dart';

import '../layout/splash.dart';

class AppRouter{
  // 首页
  static const String index = '/index';
  // 启动页
  static const String splash = '/splash';
  // 登录页面
  static const String login = '/login';
  // 个人中心
  static const String profile = '/profile';
  // 404
  static const String notFound = '/404';

  static final GetPage unknownRoute = GetPage(
    name: notFound,
    page: () => Container(
      color: Colors.white,
      child: Center(
        child: Text('404'),
      ),
    ),
  );

  static final List<GetPage> routes = [
    GetPage(
      name: index,
      page: () => TabbarPage(title: '',)
    ),
    GetPage(
      name: splash,
      page: () => SplashPage()
    ),
    GetPage(
        name: login,
        page: () => LoginPageView()
    ),
    GetPage(
      name: profile,
      page: () => Container(
        color: Colors.white,
        child: Center(
          child: Text('个人中心'),
        ),
      ),
    )
  ];
}